package com.example.word

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.NavController
import androidx.navigation.findNavController
import androidx.navigation.ui.setupActionBarWithNavController
import kotlinx.coroutines.GlobalScope

class MainActivity : AppCompatActivity() {
    private lateinit var controller:NavController
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        controller = findNavController(R.id.fragment)
        setupActionBarWithNavController(controller)
        GlobalScope
    }

    override fun onSupportNavigateUp(): Boolean {
        return super.onSupportNavigateUp() || controller.navigateUp()
    }

}